<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="d1" style="width: 500px;height: 500px; background-color: aqua;" >
        <ul>
            <li>li1</li>
            <li>li2</li>
            <li>li3</li>
            <li>li4</li>
            <li>li5</li>
        </ul>                                                   
    </div>

    <script>
        var ele = document.getElementById("d1");
        console.dir(ele);
        console.dir(ele.style.backgroundColor);
        ele.style.backgroundColor = "red";
        ele.childNodes.forEach((e,i)=>{
            console.log(e.nodeType);
            // console.log(e);
        })
    </script>
</body>
</html>